<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Student Main Page</title>
</h:head>
<ui:composition template="mainTemplate.xhtml">
	<ui:define name="header">
		<ui:include src="studentHeader.xhtml" />
	</ui:define>
	<ui:define name="main_content">
		<h:form id="form1">
			<p:dataTable id="dataTable" var="courses"
				value="#{studentMainController.coursesList}"
				selection="#{studentMainController.selectedCourse}"
				selectionMode="single" rowKey="#{courses.id}">
				<f:facet name="header">
            		Student Active Courses
        		</f:facet>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Title" />
					</f:facet>
					<h:outputText value="#{courses.title}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Start course" />
					</f:facet>
					<p:commandButton value="Go Course"
						action="#{studentMainController.goCourse}" ajax="false" />
				</p:column>
			</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>
</html>